<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旋转三角</title>
    <style>
        .co{
            position: relative;
            width: 400px;
            height: 40px;
            border: 1px solid #000;
            margin: auto;
        }
        .co div:first-child{
            position: absolute;
            top: 5px;
            right: 14px;
            width: 15px;
            height: 15px;
            border-right: 1px solid #000;
            border-bottom: 1px solid #000;
            transform: rotate(45deg);
        }
        .co:hover div:first-child{
            transform: translateY(10px) rotate(-135deg);
        }
    </style>
</head>
<body>
    <div class="co">
        <div></div>
    </div>
</body>
</html>